<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		/*var arr1=['jack',12,80,3,55,'apple']
		function fn(arr){ 
			for(var i=0;i<arr.length;i++){
				var arr2=arr.toString()
				if(arr2[i]>arr2[i+1]){
					var temp=arr2[i]
					arr2[i]=arr2[i+1]
					arr2[i+1]=temp}
			}     
            console.log(arr2)  
		      }
             fn(arr1)*/
        var arr1=['jack',12,80,3,55,'apple']
        function fn(arr){
        	for(var i=0;i<arr.length-1;i++){
        		for(var k=0;k<arr.length-1-i;k++){
        			if(String(arr[k])>String(arr[k+1])){
        				var temp=arr[k];
        				arr[k]=arr[k+1];
        				arr[k+1]=temp;
        			}
        		}
        	}
        	console.log(arr)
        }

       fn(arr1)
			

			
		
	</script>
</head>
<body>
	
</body>
</html>